﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;

namespace BeatingMole
{
    class CInfoGameResult
    {        
        #region "Variables"
        private ContentManager _content;

        /// <summary>
        /// Tổng số điểm của màn chơi
        /// </summary>
        public int TotalScore { get; set; }
        /// <summary>
        /// Background
        /// </summary>
        public Texture2D BackGround { get; set; }
        /// <summary>
        /// Danh sách các Enemy bị chết trong màn chơi
        /// </summary>
        public List<CInfoEnemy> ListEnemy { get; set; }

        /// <summary>
        /// Ngôi sao quy điểm quy đổi
        /// </summary>
        public Texture2D StarsImage { get; set; }

        /// <summary>
        /// Đọc file xml Stars
        /// </summary>
        public Dictionary<string, Rectangle> XmlStars { get; set; }

        /// <summary>
        /// Tổng số Frame
        /// </summary>
        public int NumberFrames { get; set; }

        /// <summary>
        /// Số thứ tự Frame
        /// </summary>
        public int IndexFrame { get; set; }

        /// <summary>
        /// Tên Frame
        /// </summary>
        public string NameFrame { get; set; }

        /// <summary>
        /// Texture2D Score
        /// </summary>
        public Texture2D ScoreImage { get; set; }

        /// <summary>
        /// Xml Score
        /// </summary>
        public Dictionary<string, Rectangle> XmlScore { get; set; }


        /// <summary>
        /// Button Next Level
        /// </summary>
        public Texture2D ButtonNextLevel { get; set; }

        #endregion

        public CInfoGameResult(ContentManager content)
        {
            _content = content;
            BackGround = _content.Load<Texture2D>(@"Resource/Maps/bg-score");
            StarsImage = _content.Load<Texture2D>(@"Resource/Maps/Stars");
            ScoreImage = _content.Load<Texture2D>(@"Resource/Items/score");
            ButtonNextLevel = _content.Load<Texture2D>(@"Resource/Buttons/btnNextLevel");
            XmlStars = content.Load<Dictionary<string, Rectangle>>(@"Resource/Xml/Stars");
            XmlScore = content.Load<Dictionary<string, Rectangle>>(@"Resource/Xml/score");
            NumberFrames = 1;
            IndexFrame = 0;
            NameFrame = "stars0";            
            ListEnemy = new List<CInfoEnemy>();
        }
    }
}
